package com.leesche.zcsp.node.web.service.impl;

import com.leesche.zcsp.node.web.dao.SysAppInfoDao;
import com.leesche.zcsp.node.web.model.SysAppInfo;
import com.leesche.zcsp.node.web.model.SysAppInfoCriteria;
import com.leesche.zcsp.node.web.service.SysAppInfoService;
import com.leesche.zcsp.node.web.service.impl.data.read.QueryAppInfoCondition;
import com.leesche.zcsp.node.web.service.impl.data.read.SysAppInfoDto;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import org.springframework.transaction.annotation.Transactional;

@Service
@Transactional
public class SysAppInfoServiceImpl extends
        BaseServiceImpl<SysAppInfo, SysAppInfoCriteria, SysAppInfoDto, QueryAppInfoCondition, Long>
        implements SysAppInfoService {

    @Autowired
    private SysAppInfoDao sysAppInfoDao;

    @Autowired
    public void setBaseDao(SysAppInfoDao sysAppInfoDao) {
        super.setBaseDao(sysAppInfoDao);
    }

    @Override
    public SysAppInfo findAppByLatestVersion(QueryAppInfoCondition condition) {
        return sysAppInfoDao.selectAppByLatestVersion(condition);
    }
}
